The US president's tweet provoked sharp criticism from commentators who saw it as a piece of opportunism at London's expense.